
import VueRouter from 'vue-router'


import myPerson from "./views/person/my-person.vue"
//个人中心子组件
import myTg from "./views/person/my-tg.vue"
import mySx from "./views/person/my-sx.vue"
import personPage from './views/person/person-page.vue'
import mySc from "./views/person/my-sc.vue"
import myLs from "./views/person/my-ls.vue"
import myTgGl from "./views/person/my-tg-gl.vue"
import myQz from './views/person/my-qz.vue'
import mySz from './views/person/my-sz.vue'

import mySearch from "./views/my-search.vue";
import myPlay from "./views/my-play.vue"
import myLogin from "./views/account/my-login.vue"
import myRegister from "./views/account/my-register.vue"
import myPwd from "./views/account/my-pwd.vue"
import myIndex from './views/my-index.vue'
import myChildren from './views/my-children.vue'
import myMore from './views/my-more.vue'
import myVip from './views/my-vip.vue'
import myVipOpen from './views/my-vip-open.vue'

//管理视图
import myAdmin from './views/admin/my-admin.vue'
import adminUser from './views/admin/admin-user.vue'
import adminVideo from './views/admin/admin-video.vue'
import adminType from './views/admin/admin-Type.vue'
import adminComment from './views/admin/admin-comment.vue'
import adminVip from './views/admin/admin-vip.vue' //vip视频上传页面
import adminLunbotu from './views/admin/admin-lunbotu.vue'//轮播图管理页面






var router = new VueRouter({
    routes: [
        { path: "/login", name: 'login', component: myLogin },//登录路由
        { path: '/register', name: 'register', component: myRegister },
        { path: '/pwd', name: 'pwd', component: myPwd },
        { path: '/play', name: 'play', component: myPlay, children: [] },
        { path: '/search', name: 'search', component: mySearch },
        {
            path: '/person', name: 'person', component: myPerson,
            children: [
                { path: 'tg', name: 'tg', component: myTg },
                { path: 'sx', name: 'sx', component: mySx },
                { path: 'sc', name: 'sc', component: mySc },
                { path: 'ls', name: 'ls', component: myLs },
                { path: 'tg-gl', name: 'tg-gl', component: myTgGl },
                { path: 'qz', name: 'qz', component: myQz },
                { path: 'sz', name: 'sz', component: mySz }
            ]
        },
        { path: '/personPage', name: 'personPage', component: personPage },
        { path: '/index', name: 'index', component: myIndex },
        {
            path: '/admin', name: 'admin', component: myAdmin,
            children: [
                { path: 'user', name: 'adminUser', component: adminUser },
                { path: 'video', name: 'adminVideo', component: adminVideo },
                { path: 'type', name: 'adminType', component: adminType },
                { path: 'comment', name: 'adminComment', component: adminComment },
                { path: 'vip', name: 'adminVip', component: adminVip },
                { path: 'lunbotu', name: 'adminLunbotu', component: adminLunbotu }
            ]
        },
        { path: '/children', name: 'children', component: myChildren },
        { path: '/my-more', name: 'more', component: myMore },
        { path: '/vip', name: 'vip', component: myVip },
        { path: '/vipOpen', name: 'vipOpen', component: myVipOpen },
        { path: '/', redirect: '/index' }
    ]
})

export default router